In machining, it is important to machine a workpiece as defined in a design drawing and as specified in a machining setting. To do so, it is necessary to figure out accurately the position, direction, and amount of machining of the workpiece.
For example, in the case of a structure such as the airframe of an aircraft formed by mechanically joining a large number of components with mechanically joining members such as rivets and fasters, accurate machining positions, directions, and amounts are necessary when holes to insert the mechanically joining members are drilled in the components.
When a main wing, which is a component of an aircraft, and a frame member or the like is mechanically joined with mechanically joining members or the like, such mechanical joining sometimes results in formation of protrusions on the surface of the main wing due to the mechanically joining members protruding from the surface of the main wing and/or formation of recesses in the surface of the main wing due to deep attachment holes provided for the mechanically joining members. These protrusions and recesses on and in the surface of the main wing affect the aerodynamic performance of the aircraft. Thus, the holes to insert the mechanically joining members are each drilled in the main wing, or a workpiece, at an accurate machining position in an accurate machining direction by an accurate machining amount so that the protrusions and recesses can be minimized. Here, the machining direction is usually perpendicular to the machining surface of the workpiece; hence, it is necessary to find the normal vector of the machining surface at the time of machining.